package br.com.siscob.model;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@Entity
@Table(name="professor")
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
public class CadProfessor extends Pessoa implements Serializable{
	
	@Id
	@GeneratedValue
	private int idProfessor;
	@OneToMany(mappedBy="professor")
	@Cascade(CascadeType.ALL)
	private Collection<Contato> contato;
	
	
	public CadProfessor() {
	}


	public int getidProfessor() {
		return idProfessor;
	}
	
	public void setidProfessor(int idProfessor){ 
		this.idProfessor = idProfessor;
	}



	public Collection<Contato> getContato() {
		return contato;
	}


	public void setContato(Collection<Contato> contato) {
		this.contato = contato;
	}
}

